import Vapor
import Fluent

final class DepartmentEmployeePivot: Model, Content {
    
    static let schema: String = "department-employee-pivot"
    
    @ID
    var id: UUID?
    
    @Parent(key: "departmentID")
    var department: Department
    
    @Parent(key: "employeeID")
    var employee: Employee
    


 
    init() {
        
    }
    
    init(id: UUID? = nil, department: Department, employee: Employee) throws {
      self.id = id
      self.$department.id = try department.requireID()
      self.$employee.id = try employee.requireID()
    }
    
    
}
